package com.jiayinlending.jiayindai.adapter;

import android.content.Context;
import android.content.Intent;
import android.view.View;
import android.view.ViewGroup;
import android.widget.SeekBar;

import com.jiayinlending.jiayindai.R;
import com.jiayinlending.jiayindai.activity.home.HomeDetailsActivity;
import com.jiayinlending.jiayindai.adapter.base.BaseRecyclerViewAdapter;
import com.jiayinlending.jiayindai.adapter.viewholder.HomeRecylerHolder;
import com.jiayinlending.jiayindai.net.bean.Info;

import java.util.List;

/**
 * Created by xiaohei on 2017/3/29.
 */

public class HomeRecylerAdpater extends BaseRecyclerViewAdapter<HomeRecylerHolder, Info> {

    private SeekBar sb_jindu;

    public HomeRecylerAdpater(Context context, List data) {
        super(context, data);
    }


    @Override
    public HomeRecylerHolder onCreateViewHolder(final ViewGroup parent, int viewType) {
        View view = View.inflate(parent.getContext(), R.layout.fragment_home_item, null);
        sb_jindu = (SeekBar) view.findViewById(R.id.sb_jindu);
        sb_jindu.setProgress(50);
        view.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(parent.getContext(), HomeDetailsActivity.class);
                context.startActivity(intent);
            }
        });
        return new HomeRecylerHolder(view);
    }

    @Override
    public void onBindViewHolder(HomeRecylerHolder holder, int position) {
    }

}
